<template>
	<view class="popup-dialog">
		<view class="popup-header">
			{{titleName}}
			<text class="icon cuIcon-close" @click="closeDialog"></text>
		</view>
		<view class="popup-main">
	       <slot />
		</view>
		
	</view>
</template>

<script>
	export default{
		props:{
			titleName:{
				type:String,
				default:""				
			}

		},
		methods:{
			closeDialog(){
				this.$emit('closeDialog')
			}
		}
		
	}
</script>

<style lang="scss" scoped>
	
	.popup-dialog{
		width: 100vw;
		height: 1000rpx;
		background-color: #fff;
		padding:24rpx;
		padding-top: 0;
		border-radius: 40rpx 40rpx 0 0;
		.popup-header{
			padding:40rpx 0;
			position: relative;
			text-align: center;
			color: #3D3D3D;
			font-size: 32rpx;
			.icon{
				top: 42rpx;
				font-size: 36rpx;
				right: 42rpx;
				color: #3D3D3D;
				position: absolute;
			}
			
		}
		.popup-main{
			height:calc(900rpx - 120rpx)  ;
			
		}
	}
</style>